package com.wx.gof.pattern.behavioral.state;

/**
 * @ClassName VideoStateContext
 * @Author wx
 * @Description 视频上下文
 * @Date 2018-12-16-21:06
 */
public class VideoStateContext {
    private VideoState videoState;
    public final static  StartState STARTSTATE = new StartState();
    public final static  SuspendState SUSPENDSTATE = new SuspendState();
    public final static  SpeedState SPEEDSTATE = new SpeedState();
    public final static  StopState STOPSTATE = new StopState();

    public VideoState getVideoState() {
        return videoState;
    }

    public void setVideoState(VideoState videoState) {
        this.videoState = videoState;
        this.videoState.setVideoStateContext(this);
    }

    public void  start(){
        this.videoState.start();
    }
    public void suspend() {
        this.videoState.suspend();
    }
    public void speed(){
        this.videoState.speed();
    }
    public void stop(){
        this.videoState.stop();
    }
}
